package org.droidcon.apps.template.provider;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public abstract class ContentAuthorityFactory {

	static Properties mProps = new Properties();
	private static boolean mInitialized = false;

	public static String getContentAuthority() {
		initProps();
		return mProps.getProperty("content_authority");
	}


	private static void initProps() {
		if (!mInitialized) {
			InputStream is = ContentAuthorityFactory.class.getClassLoader()
					.getResourceAsStream("droidcon.properties");

			try {
				mProps.load(is);
				mInitialized = true;
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
